<!DOCTYPE html>
<html xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
	<title>#{msg.cperson}</title>
	<link href="resources/styles/main.css" rel="stylesheet" type="text/css" />
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</h:head>

<h:body>
	<f:view locale="#{language.localeCode}" />
	<div id="container">
		<div id="header">
			<ui:include src="/header.xhtml">
				<ui:param name="title" value="#{msg.person}" />
			</ui:include>
		</div>
		<div id="content">

			<h:form id="personDetailForm">
				<h:panelGrid id="pnlPersonDetail" columns="2" cellspacing="30"
					border="0" title="Universitario">
					<c:if test="#{personViewBean.editible}">
	    Person Id:<h:inputText value="#{personViewBean.selectedPerson.id}"
							readonly="true">
						</h:inputText>
					</c:if>
		Person FirstNameUa:<h:inputText value="#{personViewBean.selectedPerson.firstnameua}"
						required="true" requiredMessage="#{msg.rmfirstname}" />
		Person LastNameUa:<h:inputText value="#{personViewBean.selectedPerson.lastnameua}"
						required="true" requiredMessage="#{msg.rmlastname}" />
		Person FirstNameRu:<h:inputText value="#{personViewBean.selectedPerson.firstnameru}"
						required="true" requiredMessage="#{msg.rmfirstname}" />
		Person LastNameRu:<h:inputText value="#{personViewBean.selectedPerson.lastnameru}"
						required="true" requiredMessage="#{msg.rmlastname}" />
		Person FirstNameEng:<h:inputText value="#{personViewBean.selectedPerson.firstnameeng}"
						required="true" requiredMessage="#{msg.rmfirstname}" />
		Person LastNameEng:<h:inputText value="#{personViewBean.selectedPerson.lastnameeng}"
						required="true" requiredMessage="#{msg.rmlastname}" />
		Person MiddleNameRu:<h:inputText value="#{personViewBean.selectedPerson.middlenameru}"
						required="true" requiredMessage="#{msg.rmmiddlename}" />
		Person MiddleNameUa:<h:inputText value="#{personViewBean.selectedPerson.middlenameua}"
						required="true" requiredMessage="#{msg.rmmiddlename}" />
		Person Dob:<h:inputText value="#{personViewBean.selectedPerson.dob}"
						required="true" requiredMessage="#{msg.rmdob}"
						converterMessage="#{msg.vmdob}">
							<f:convertDateTime type="date" pattern="dd.MM.yyyy" />
						</h:inputText>
		Person Address:<h:inputTextarea value="#{personViewBean.selectedPerson.address}"
						required="true" requiredMessage="#{msg.rmaddress}" />
		Person Details:<h:inputTextarea value="#{personViewBean.selectedPerson.details}"
						required="true" requiredMessage="#{msg.rmdetails}" />
		Person Sex:<h:inputText value="#{personViewBean.selectedPerson.sex}"
						required="true" requiredMessage="#{msg.rmsex}" />
		Person Phone:<h:inputText value="#{personViewBean.selectedPerson.phone}"
						required="true" requiredMessage="#{msg.rmphone}" />
		Person Email:<h:inputText value="#{personViewBean.selectedPerson.email}"
						required="true" requiredMessage="#{msg.rmemail}"
						validatorMessage="#{msg.vmemail}">
						<f:validateRegex
							pattern="([\w\-]+[.]?[\w\-]+)+@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))" /> 
					</h:inputText>
		Person Code:<h:inputText value="#{personViewBean.selectedPerson.code}"
						required="true" requiredMessage="#{msg.rmcode}" />
					<c:if test="#{not empty personViewBean.selectedPerson.created}">
	    Person Created:<h:inputText readonly="true"
							value="#{personViewBean.selectedPerson.created}" />
	    Person Modified:<h:inputText readonly="true"
							value="#{personViewBean.selectedPerson.modified}" />
					</c:if>
					<ui:include src="/detail.xhtml">
						<ui:param name="bean" value="#{personViewBean}" />
					</ui:include>
					<br />
				</h:panelGrid>
			</h:form>
		</div>
		<div id="footer">
			<ui:insert name="footer">
				<ui:include src="/footer.xhtml" />
			</ui:insert>
		</div>
	</div>
</h:body>
</html>